The present invention relates to the field of mass storage devices. More particularly, this invention relates to an apparatus and method for passing over, or more specifically slipping, defective sectors on disc surfaces within a disc drive.
One key component of any computer system is a device to store data. Computer systems have many different places where data can be stored. One common place for storing massive amounts of data in a computer system is on a disc drive. The most basic parts of a disc drive are an information storage disc that is rotated, an actuator that moves a transducer to various locations over the disc, and electrical circuitry that is used to write and read data to and from the disc. The disc drive also includes circuitry for encoding data so that it can be successfully retrieved and written to the disc surface. A microprocessor controls most of the operations of the disc drive as well as passing the data back to the requesting computer and taking data from a requesting computer for storing to the disc.
The transducer is typically placed on a small ceramic block, also referred to as a slider, that is aerodynamically designed so that it flies over the disc. The slider is passed over the disc in a transducing relationship with the disc. Most sliders have an air-bearing surface (xe2x80x9cABSxe2x80x9d) which includes rails and a cavity between the rails. When the disc rotates, air is dragged between the rails and the disc surface causing pressure, which forces the head away from the disc. At the same time, the air rushing past the cavity or depression in the air bearing surface produces a negative pressure area. The negative pressure or suction counteracts the pressure produced at the rails. The slider is also attached to a load spring which produces a force on the slider directed toward the disc surface. The various forces equilibrate so the slider flies over the surface of the disc at a particular desired fly height. The fly height is the distance between the disc surface and the transducing head, which is typically the thickness of the air lubrication film. This film eliminates the friction and resulting wear that would occur if the transducing head and disc were in mechanical contact during disc rotation. In some disc drives, the slider passes through a layer of lubricant rather than flying over the surface of the disc.
Information representative of data is stored on the surface of the storage disc. Disc drive systems read and write information stored on tracks on storage discs. Transducers, in the form of read/write heads attached to the sliders, located on both sides of the storage disc, read and write information on the storage discs when the transducers are accurately positioned over one of the designated tracks on the surface of the storage disc. The transducer is also said to be moved to a target track. As the storage disc spins and the read/write head is accurately positioned above a target track, the read/write head can store data onto a track by writing information representative of data onto the storage disc. Similarly, reading data on a storage disc is accomplished by positioning the read/write head above a target track and reading the stored material on the storage disc. To write on or read from different tracks, the read/write head is moved radially across the tracks to a selected target track.
In a disc drive having more than one surface on which to record data, the tracks at substantially the same radial distance from the center of the disc or discs are said to be in a cylinder. The cylinder is one unit of storage which includes several tracks. Each these cylinders and each track on a disc surface in a disc drive is further divided into a number of short arcs called sectors. The sector typically holds 512 bytes of information representing data. The number of sectors on a track used to be fixed wherever the track was located on the disc surface. Now, the number of sectors held on a track or within a cylinder varies depending on the zone which the track or cylinder is in. Typically, more sectors will be stored on the tracks and in the cylinders at the outer diameter which are in the zone toward the outer diameter of the disc.
Each sector in a disc drive is individually addressable. In order to locate the data, each sector is given a unique address, known as the physical cylinder, physical head and physical sector number. Some term this as the physical cylinder, head and sector (PCHS). Given these three parameters, the location of any sector can be determined.
When a disc is manufactured, there is a possibility that there may be defects on the disc. The defects typically can result in sectors or tracks that have doubtful, dangerous, or damaged magnetic media, which would otherwise put the customer""s data at risk. These defects are to be avoided so that information representative of data is not written to a location where the data could be lost. Typically, each disc surface is checked for defects at the time of manufacture. A sector is considered defective if a number of retries must be used to recover the data on the sector. A sector is also considered defective if data written to the sector is not recoverable. The sectors occupying these locations are named as defects. These defects cannot be used for data storage and hence cannot be presented to the host computer for access.
Of course, avoiding the defective sectors can be done in any of a number of ways but each way requires keeping the defect in memory. In most disc drives, the defect management system has adopted a method of sector address translation, which simplifies the tasks of a host computer by offloading the tasks to the controller of a disc drive. The drive presents to a host computer, a collection of good sectors known as the logical block address (LBAs). Based on a known list of defects, the firmware of the disc drive translates the LBA to a physical cylinder, head and sector location (PCHS). While accessing the physical sector address in the sequential order, the defective sectors are skipped over. Therefore, every LBA is mapped to a unique physical cylinder, head and sector (PCHS) in the disc drive. Data files and program files are typically much larger than the number of bytes allocated to a sector. As a result, data and program files are divided and stored on disc drives as a number of LBAs. The actual methods of doing this are unique to every operating system. Before the disc drive can be used for this purpose, the operating system formats the disc drive by creating a lookup table of its own to map the data and program files to every LBA in the disc drive.
Every operating system employs a unique look up table method to locate data and program files in a disc drive. While the location of data and program files in the disc drives can change the location of these lookup tables are fixed during the formatting of the disc drive and will not change until the disc drive is reformatted again.
A typical data or file access requires the operating system to read the LBA containing the directory of filenames. The directory of filenames is read to determine if the file is available on the particular disc drive. If the file is found in the directory, the directory is read and contains information regarding the beginning 25A of the file. Another table, referred to as the file allocation table (FAT) includes the information. If the file that describes the location of the entire file. Finally, the disc drive proceeds to read the requested file into the memory. This can be summarized below:
1. End user request to read a data file.
2. Operating system search for the file in its director.
3. When file is found, operating system reads a file-allocation table describing all the LBA and order of the LBA which make up the data file.
4. Operating system finally proceeds to read the data file for the user.
In order to complete each read command to read data, both the directory and the file allocation tables are read. Of course, the majority of the time the data stored on a disc drive is read. Therefore, the majority of the time the disc drive is xe2x80x9cworkingxe2x80x9d it is executing read commands. As a result, any time that can be saved in reading the directory and in reading the file allocation tables will greatly enhance the performance of the disc drive.
Since every LBA maps to a unique physical cylinder, head and sector (PCHS), it is possible to predict the PCHS location of the LBAs in directory and the PCHS location of the LBAs in the file allocation table when the user formats the disc drive. Depending on the defective sectors in the disc drive, the PCHS locations may change from disc drive to disc drive. Defective sectors can occur anywhere on the disc surface. One method or scheme for handling defects is called defect slipping. This scheme of handling defects is generally used at the time of manufacture of the disc drive. In essence, when a defective sector is located, the defective sector is skipped and the next LBA is written to the next available good physical sector location. Defect slipping skips over defective sectors and keeps the locations of the defects in a large table. Each time a defective sector is skipped, the physical cylinder, head, sector (PCHS) address is offset from the logical block address (LBA). If a large number of defects are found, a large number of defective sectors are skipped resulting in a large offset between the PCHS and the LBA.
Some operating systems require that two copies of the file allocation table be written to disc for back up purposes. If one file allocation table is damaged, it can be reconstructed from a mirror copy. Of course keeping a mirror requires that upon completion of each write command, both file allocation tables are updated. The number of defective sectors located in the physical sectors between the first file allocation table and the second file allocation table determines the number of sectors which are slipped before the second file allocation table. Of course, the effect of slipping sectors is that the actual physical location of a particular sector may be slipped down a track, to another track within a cylinder, or to another cylinder. To determine the PCHS, an estimate is usually made by applying a formula to the LBA. Generally, the estimate presumes that no defective sectors have been found. The estimate selects the head and track as if no defective sectors are found. In other words, it is presumed no offset or that no sectors have been slipped. In the event a large number of defective sectors have been found, there are cases where the estimate may be offset by one or more tracks or cylinders. The algorithm essentially is to make an estimate ignoring any slipped sectors which corresponds to a location before the actual PCHS if there are any slipped sectors. The number of slipped sectors and the effect that they have on location is sometimes referred to as an offset. The number of defective sectors found determines the size of the offset.
The offset may cause problems if the PCHS of logical block address in the second file allocation table is radially positioned so that the rotation of the discs during a seek between the first file allocation table to the second file allocation results in just missing the corresponding LBA in the second file allocation table. This lengthens the process of updating the first and second file allocation tables since an additional rotation must be made in order to update an LBA in the second file allocation table. Some term the condition of having the corresponding addresses in the two allocation tables missing due to the rotation of the disc during a seek as being xe2x80x9cout of alignmentxe2x80x9d. In essence, after reading the information in one table, in the time necessary to seek to the second table the PCHS of the LBA in the second table is just missed. Repeated disk accesses and xe2x80x9cout-of-alignmentxe2x80x9d LBA reads will eventually lead to lower disc drive performance. Access times will suffer. When an xe2x80x9cout-of-alignmentxe2x80x9d offset case is produced in the file allocation table, performance degradation is accelerated since the file allocation table must be accessed for each read command.
What is needed is a method and apparatus for managing the spacing between the first file allocation table and the second file allocation table so that a seek between corresponding LBA does not result in a near miss. This is needed to reduce access times caused by slipped sector offsets in the directory and the file allocation table of the disc drive. There is also a need for a system and method to reliably access the directory and the file allocation table during the execution of read commands. There is still a further need for a system and method for allowing quicker updates of the first table and the second table after executing a write command.
A method for formatting a plurality of sectors to a storage surface on a disc in a disc drive includes reading information from a first location for storage of a first logical block address on a disc to determine a second location on the disc and determining a second physical location, spaced from the first location. The method also includes formatting the disc surface by providing a selected number of fake defective sectors before the second physical location. The added fake sectors cause the radial position of the second physical location to slip with respect to the first location. Slipping the radial position of the second physical location helps during a seek. The second location is slipped just enough so that during a seek from the first physical location to the second physical location, a transducer for reading or writing to the second location arrives just in time to read or write to the second location. The first location may include a directory of files on the disc drive or a file allocation table. The second location generally includes a file allocation table.
To format the disc drive, a list of defective sector entries is obtained, and a first location of selected information is determined based on the skipped defective sectors of defective sector entry list. A second location for selected information is calculated and at least one sector to the number of sectors to skip to move the selected information from the first position to the second position. Adding the sector includes designating at least one good sector as a defective sectors. In other words, adding at least one sector to skip to move the selected information from the first position to the second position includes designating good sectors as defective sectors. Calculation of the second location includes equating the second location for the selected information to a target position for a seek operation, and selecting a start position for the seek operation. The start position for the seek operation is typically from a sector on the disc which stores critical information, such as from a sector on the disc which stores a directory of files located on a disc drive or from a file allocation table. The start position for the seek operation is selected from a sector on the disc having information used by the operating system of a computer. Information used by the operating system of the computer is also stored at the target position.
Advantageously, the disc drive which uses the above inventions reduces the access times caused by offsets from slipped sectors in the directory and the file allocation table on the disc drive. The invention also provides for quick, reliable access to both the directory and the file allocation table during the execution of read commands. This prevents performance degradation since the access time is kept to a minimum. Using the invention, the access time to LBAs in the directory or the file allocation table is kept to a minimum since the estimated PCHS for the LBAs in these two critical areas are offset very little, if any, from the estimated PCHS. The invention is also flexible enough to handle different requirements from different operating systems used.